// Copyright 2011 Jefferson Willian
// willmont7@gmail.com

#include <cstdio>

int main() {
  int n;
  int points;
  int in[2];
  int games = 1;

  while (scanf("%d", &n) && n != 0) {
    points = 0;

    /* Calcula pontos */
    for (int i = 0;i < n;i++) {
      scanf("%d%d", &in[0], &in[1]);
      points += in[0]-in[1];
    }

    /* Se positivo entao Aldo ganhou */
    if (points > 0)
      printf("Teste %d\n%s\n\n", games++, "Aldo");
    /* Se negativo entao Beto ganhou */
    else
      printf("Teste %d\n%s\n\n", games++, "Beto");
  }

  return 0;
}
